<?php

namespace app\common\model;
/**
 * [VideoNew  新视频表]
 * @author [C。]
 * @return html
 */
class VideoNew extends Base
{
    protected $name = 'video_new';
    /**
     * 根据搜索条件获取列表信息
     */
    public function getlist($map,$from = 0, $size = 5,$field = '*')
    {
        $order = ['id' => 'desc'];
        $result =  $this->field($field)->order($order)->limit($from, $size)->where($map)->select();
        return $result;
    }
    /**
     * 根据搜索条件获取总条数
     */
    public function getCount($map)
    {
        $result =  $this->where($map)->count();
        return $result;
    }
}